<?php


namespace App\Http\service;

use App\Models\Sys as SysConfig;
use Illuminate\Support\Facades\Http;

class CommonService
{
    public function regeo($position)
    {
        $map_key=SysConfig::getValue('gd_map_key');
        $url="https://restapi.amap.com/v3/geocode/regeo?key={$map_key}&location={$position[0]},{$position[1]}";
        $res=Http::get($url);
        $res=json_decode($res);
        return $res;
    }
}
